Guided multi-exposure image fusion

ABSTRACT

A method includes obtaining multiple images of a scene including a first image associated with a first exposure value and a second image associated with a second exposure value. Each image includes image data in each of multiple channels of a color space, and the first exposure value is greater than the second exposure value. The method also includes decomposing each channel of each image into a base layer and a detail layer. The method further includes generating for each image, a blending weight map for the base layer and a blending weight map for the detail layer. The method includes combining each base layer and each detail layer of each channel of each image based on the blending weight map for the base layer for the image and the blending weight map for the detail layer of the image to obtain an HDR image of the scene.

CROSS-REFERENCE TO RELATED APPLICATION AND PRIORITY CLAIM

This application claims priority under 35 U.S.C. § 119(e) to U.S.Provisional Patent Application No. 63/054,160 filed on Jul. 20, 2020,which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

This disclosure relates generally to imaging systems. More specifically,this disclosure relates to guided multi-exposure image fusion.

BACKGROUND

In photography, the phrase “dynamic range” refers to a ratio of thebrightest luminosity that a photographic recording medium can capturerelative to a darkest luminosity that the photographic recording mediumcan capture. The limited dynamic range of photographic recording media,such as photographic film or digital image sensors, relative to thedynamic range of the human eye has challenged photographers and camerabuilders for over a century. Photographic images (including digitalphotographs) generally cannot reproduce the same range of bright detailsand dark details that the human eye can perceive.

High Dynamic Range (HDR) imaging involves generating a single image as ablended composite of multiple images of different exposure values, whichoffers significant improvements in terms of capturing both brighter anddarker image details relative to single exposure techniques. However,certain HDR blending techniques, such as certain pyramid blendingtechniques, may depend on image size. Also, certain HDR blendingtechniques may produce spatial inconsistencies around boundaries ofbrighter and darker image regions. These spatial inconsistencies arecommonly known as “halos” along boundaries between brighter and darkerimage regions and are often readily perceivable to viewers. Thesespatial inconsistencies can give HDR images an unnatural appearance thatdiffers from how the same scene appears to the human eye, and it ishighly undesirable for many applications.

SUMMARY

This disclosure provides systems and methods for guided multi-exposureimage fusion.

In a first embodiment, a method includes obtaining, using at least oneprocessor, multiple images of a scene including a first image associatedwith a first exposure value and a second image associated with a secondexposure value. Each image includes image data in each of multiplechannels of a color space, and the first exposure value is greater thanthe second exposure value. The method also includes decomposing, usingthe at least one processor, each channel of each image into a base layerand a detail layer. The method further includes generating, using the atleast one processor and for each image, a blending weight map for thebase layer and a blending weight map for the detail layer. In addition,the method includes combining, using the at least one processor, thebase layers and the detail layers based on the blending weight maps toobtain a high dynamic range (HDR) image of the scene.

In a second embodiment, an electronic device includes at least oneprocessor and at least one memory. The at least one memory containsinstructions that, when executed by the at least one processor, causethe electronic device to obtain multiple images of a scene including afirst image associated with a first exposure value and a second imageassociated with a second exposure value. Each image includes image datain each of multiple channels of a color space, and the first exposurevalue is greater than the second exposure value. The at least one memoryalso contains instructions that, when executed by the at least oneprocessor, cause the electronic device to decompose each channel of eachimage into a base layer and a detail layer. The at least one memoryfurther contains instructions that, when executed by the at least oneprocessor, cause the electronic device to generate, for each image, ablending weight map for the base layer and a blending weight map for thedetail layer. In addition, the at least one memory contains instructionsthat, when executed by the at least one processor, cause the electronicdevice to combine the base layers and the detail layers based on theblending weight maps to obtain an HDR image of the scene.

In a third embodiment, a non-transitory computer-readable mediumincludes instructions that, when executed by at least one processor,cause an electronic device to obtain multiple images of a sceneincluding a first image associated with a first exposure value and asecond image associated with a second exposure value. Each imageincludes image data in each of multiple channels of a color space, andthe first exposure value is greater than the second exposure value. Themedium also includes instructions that, when executed by the at leastone processor, cause the electronic device to decompose each channel ofeach image into a base layer and a detail layer. The medium furtherincludes instructions that, when executed by the at least one processor,cause the electronic device to generate, for each image, a blendingweight map for the base layer and a blending weight map for the detaillayer. In addition, the medium includes instructions that, when executedby the at least one processor, cause the electronic device to combinethe base layers and the detail layers based on the blending weight mapsto obtain an HDR image of the scene.

Other technical features may be readily apparent to one skilled in theart from the following figures, descriptions, and claims.

Before undertaking the DETAILED DESCRIPTION below, it may beadvantageous to set forth definitions of certain words and phrases usedthroughout this patent document. The terms “transmit,” “receive,” and“communicate,” as well as derivatives thereof, encompass both direct andindirect communication. The terms “include” and “comprise,” as well asderivatives thereof, mean inclusion without limitation. The term “or” isinclusive, meaning and/or. The phrase “associated with,” as well asderivatives thereof, means to include, be included within, interconnectwith, contain, be contained within, connect to or with, couple to orwith, be communicable with, cooperate with, interleave, juxtapose, beproximate to, be bound to or with, have, have a property of, have arelationship to or with, or the like.

Moreover, various functions described below can be implemented orsupported by one or more computer programs, each of which is formed fromcomputer readable program code and embodied in a computer readablemedium. The terms “application” and “program” refer to one or morecomputer programs, software components, sets of instructions,procedures, functions, objects, classes, instances, related data, or aportion thereof adapted for implementation in a suitable computerreadable program code. The phrase “computer readable program code”includes any type of computer code, including source code, object code,and executable code. The phrase “computer readable medium” includes anytype of medium capable of being accessed by a computer, such as readonly memory (ROM), random access memory (RAM), a hard disk drive, acompact disc (CD), a digital video disc (DVD), or any other type ofmemory. A “non-transitory” computer readable medium excludes wired,wireless, optical, or other communication links that transporttransitory electrical or other signals. A non-transitory computerreadable medium includes media where data can be permanently stored andmedia where data can be stored and later overwritten, such as arewritable optical disc or an erasable memory device.

As used here, terms and phrases such as “have,” “may have,” “include,”or “may include” a feature (like a number, function, operation, orcomponent such as a part) indicate the existence of the feature and donot exclude the existence of other features. Also, as used here, thephrases “A or B,” “at least one of A and/or B,” or “one or more of Aand/or B” may include all possible combinations of A and B. For example,“A or B,” “at least one of A and B,” and “at least one of A or B” mayindicate all of (1) including at least one A, (2) including at least oneB, or (3) including at least one A and at least one B. Further, as usedhere, the terms “first” and “second” may modify various componentsregardless of importance and do not limit the components. These termsare only used to distinguish one component from another. For example, afirst user device and a second user device may indicate different userdevices from each other, regardless of the order or importance of thedevices. A first component may be denoted a second component and viceversa without departing from the scope of this disclosure.

It will be understood that, when an element (such as a first element) isreferred to as being (operatively or communicatively) “coupled with/to”or “connected with/to” another element (such as a second element), itcan be coupled or connected with/to the other element directly or via athird element. In contrast, it will be understood that, when an element(such as a first element) is referred to as being “directly coupledwith/to” or “directly connected with/to” another element (such as asecond element), no other element (such as a third element) intervenesbetween the element and the other element.

As used here, the phrase “configured (or set) to” may be interchangeablyused with the phrases “suitable for,” “having the capacity to,”“designed to,” “adapted to,” “made to,” or “capable of” depending on thecircumstances. The phrase “configured (or set) to” does not essentiallymean “specifically designed in hardware to.” Rather, the phrase“configured to” may mean that a device can perform an operation togetherwith another device or parts. For example, the phrase “processorconfigured (or set) to perform A, B, and C” may mean a generic-purposeprocessor (such as a CPU or application processor) that may perform theoperations by executing one or more software programs stored in a memorydevice or a dedicated processor (such as an embedded processor) forperforming the operations.

The terms and phrases as used here are provided merely to describe someembodiments of this disclosure but not to limit the scope of otherembodiments of this disclosure. It is to be understood that the singularforms “a,” “an,” and “the” include plural references unless the contextclearly dictates otherwise. All terms and phrases, including technicaland scientific terms and phrases, used here have the same meanings ascommonly understood by one of ordinary skill in the art to which theembodiments of this disclosure belong. It will be further understoodthat terms and phrases, such as those defined in commonly-useddictionaries, should be interpreted as having a meaning that isconsistent with their meaning in the context of the relevant art andwill not be interpreted in an idealized or overly formal sense unlessexpressly so defined here. In some cases, the terms and phrases definedhere may be interpreted to exclude embodiments of this disclosure.

Examples of an “electronic device” according to embodiments of thisdisclosure may include at least one of a smartphone, a tablet personalcomputer (PC), a mobile phone, a video phone, an e-book reader, adesktop PC, a laptop computer, a netbook computer, a workstation, apersonal digital assistant (PDA), a portable multimedia player (PMP), anMP3 player, a mobile medical device, a camera, or a wearable device(such as smart glasses, a head-mounted device (HMD), electronic clothes,an electronic bracelet, an electronic necklace, an electronic accessory,an electronic tattoo, a smart mirror, or a smart watch). Other examplesof an electronic device include a smart home appliance. Examples of thesmart home appliance may include at least one of a television, a digitalvideo disc (DVD) player, an audio player, a refrigerator, an airconditioner, a cleaner, an oven, a microwave oven, a washer, a drier, anair cleaner, a set-top box, a home automation control panel, a securitycontrol panel, a TV box (such as SAMSUNG HOMESYNC, APPLETV, or GOOGLETV), a smart speaker or speaker with an integrated digital assistant(such as SAMSUNG GALAXY HOME, APPLE HOMEPOD, or AMAZON ECHO), a gamingconsole (such as an XBOX, PLAYSTATION, or NINTENDO), an electronicdictionary, an electronic key, a camcorder, or an electronic pictureframe. Still other examples of an electronic device include at least oneof various medical devices (such as diverse portable medical measuringdevices (like a blood sugar measuring device, a heartbeat measuringdevice, or a body temperature measuring device), a magnetic resourceangiography (MRA) device, a magnetic resource imaging (MRI) device, acomputed tomography (CT) device, an imaging device, or an ultrasonicdevice), a navigation device, a global positioning system (GPS)receiver, an event data recorder (EDR), a flight data recorder (FDR), anautomotive infotainment device, a sailing electronic device (such as asailing navigation device or a gyro compass), avionics, securitydevices, vehicular head units, industrial or home robots, automaticteller machines (ATMs), point of sales (POS) devices, or Internet ofThings (IoT) devices (such as a bulb, various sensors, electric or gasmeter, sprinkler, fire alarm, thermostat, street light, toaster, fitnessequipment, hot water tank, heater, or boiler). Other examples of anelectronic device include at least one part of a piece of furniture orbuilding/structure, an electronic board, an electronic signaturereceiving device, a projector, or various measurement devices (such asdevices for measuring water, electricity, gas, or electromagneticwaves). Note that, in accordance with this disclosure, an electronicdevice may be one or a combination of the above-listed devices. Inaccordance with this disclosure, the electronic device may be a flexibleelectronic device. The electronic device disclosed here is not limitedto the above-listed devices and may include any other electronic devicesnow known or later developed.

In the following description, electronic devices are described withreference to the accompanying drawings, in accordance with thisdisclosure. As used here, the term “user” may denote a human or anotherdevice (such as an artificial intelligent electronic device) using theelectronic device.

Definitions for other certain words and phrases may be providedthroughout this patent document. Those of ordinary skill in the artshould understand that in many if not most instances, such definitionsapply to prior as well as future uses of such defined words and phrases.

None of the description in this application should be read as implyingthat any particular element, step, or function is an essential elementthat must be included in the claim scope. The scope of patented subjectmatter is defined only by the claims. Moreover, none of the claims isintended to invoke 35 U.S.C. § 112(f) unless the exact words “means for”are followed by a participle. Use of any other term, including withoutlimitation “mechanism,” “module,” “device,” “unit,” “component,”“element,” “member,” “apparatus,” “machine,” “system,” “processor,” or“controller,” within a claim is understood by the Applicant to refer tostructures known to those skilled in the relevant art and is notintended to invoke 35 U.S.C. § 112(f).

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of this disclosure and its advantages,reference is now made to the following description, taken in conjunctionwith the accompanying drawings, in which:

FIG. 1 illustrates an example network configuration including anelectronic device in accordance with this disclosure;

FIG. 2 illustrates an example technique for providing guidedmulti-exposure image fusion in accordance with this disclosure;

FIGS. 3A, 3B, 3C, 3D, 3E, and 3F illustrate example operations fordecomposing input image data into base and detail layers in accordancewith this disclosure;

FIGS. 4A, 4B, 4C, 4D, 4E, 4F, 4G, and 4H illustrate example initialblending maps and blending weight maps for base and detail layers inaccordance with this disclosure;

FIG. 5 illustrates an example combination of a fused base layer and afused detail layer to obtain a channel of an HDR image in accordancewith this disclosure;

FIG. 6 illustrates an example method for performing guidedmulti-exposure image fusion in accordance with this disclosure; and

FIGS. 7A and 7B illustrate example methods for supporting guidedmulti-exposure image fusion in accordance with this disclosure.

DETAILED DESCRIPTION

FIGS. 1 through 7B, discussed below, and the various embodiments used todescribe the principles of this disclosure in this patent document areby way of illustration only and should not be construed in any way tolimit the scope of the disclosure. Those skilled in the art willunderstand that the principles of this disclosure may be implemented inany suitably arranged processing platform.

FIG. 1 illustrates an example network configuration 100 including anelectronic device in accordance with this disclosure. The embodiment ofthe network configuration 100 shown in FIG. 1 is for illustration only.Other embodiments of the network configuration 100 could be used withoutdeparting from the scope of this disclosure.

According to embodiments of this disclosure, an electronic device 101 isincluded in the network configuration 100. The electronic device 101 caninclude at least one of a bus 110, a processor 120, a memory 130, aninput/output (I/O) interface 150, a display 160, a communicationinterface 170, and a sensor 180. In some embodiments, the electronicdevice 101 may exclude at least one of these components or may add atleast one other component. The bus 110 includes a circuit for connectingthe components 120-180 with one another and for transferringcommunications (such as control messages and/or data) between thecomponents.

The processor 120 includes one or more of a central processing unit(CPU), a graphics processor unit (GPU), an application processor (AP),or a communication processor (CP). The processor 120 is able to performcontrol on at least one of the other components of the electronic device101 and/or perform an operation or data processing relating tocommunication. In some embodiments of this disclosure, for example, theprocessor 120 may obtain and process image frames and generate HighDynamic Range (HDR) images using guided multi-exposure image fusion asdescribed in more detail below.

The memory 130 can include a volatile and/or non-volatile memory. Forexample, the memory 130 can store commands or data related to at leastone other component of the electronic device 101. According toembodiments of this disclosure, the memory 130 can store software and/ora program 140. The program 140 includes, for example, a kernel 141,middleware 143, an application programming interface (API) 145, and/oran application program (or “application”) 147. At least a portion of thekernel 141, middleware 143, or API 145 may be denoted an operatingsystem (OS).

The kernel 141 can control or manage system resources (such as the bus110, processor 120, or memory 130) used to perform operations orfunctions implemented in other programs (such as the middleware 143, API145, or application 147). The kernel 141 provides an interface thatallows the middleware 143, the API 145, or the application 147 to accessthe individual components of the electronic device 101 to control ormanage the system resources. The application 147 may include one or moreapplications that, among other things, obtain and process image framesand generate HDR images using guided multi-exposure image fusion asdescribed in more detail below. These functions can be performed by asingle application or by multiple applications that each carries out oneor more of these functions.

The middleware 143 can function as a relay to allow the API 145 or theapplication 147 to communicate data with the kernel 141, for instance. Aplurality of applications 147 can be provided. The middleware 143 isable to control work requests received from the applications 147, suchas by allocating the priority of using the system resources of theelectronic device 101 (like the bus 110, the processor 120, or thememory 130) to at least one of the plurality of applications 147. TheAPI 145 is an interface allowing the application 147 to controlfunctions provided from the kernel 141 or the middleware 143. Forexample, the API 145 includes at least one interface or function (suchas a command) for filing control, window control, image processing, ortext control.

The I/O interface 150 serves as an interface that can, for example,transfer commands or data input from a user or other external devices toother component(s) of the electronic device 101. The I/O interface 150can also output commands or data received from other component(s) of theelectronic device 101 to the user or the other external device.

The display 160 includes, for example, a liquid crystal display (LCD), alight emitting diode (LED) display, an organic light emitting diode(OLED) display, a quantum-dot light emitting diode (QLED) display, amicroelectromechanical systems (MEMS) display, or an electronic paperdisplay. The display 160 can also be a depth-aware display, such as amulti-focal display. The display 160 is able to display, for example,various contents (such as text, images, videos, icons, or symbols) tothe user. The display 160 can include a touchscreen and may receive, forexample, a touch, gesture, proximity, or hovering input using anelectronic pen or a body portion of the user.

The communication interface 170, for example, is able to set upcommunication between the electronic device 101 and an externalelectronic device (such as a first electronic device 102, a secondelectronic device 104, or a server 106). For example, the communicationinterface 170 can be connected with a network 162 or 164 throughwireless or wired communication to communicate with the externalelectronic device. The communication interface 170 can be a wired orwireless transceiver or any other component for transmitting andreceiving signals.

The wireless communication is able to use at least one of, for example,long term evolution (LTE), long term evolution-advanced (LTE-A), 5thgeneration wireless system (5G), millimeter-wave or 60 GHz wirelesscommunication, Wireless USB, code division multiple access (CDMA),wideband code division multiple access (WCDMA), universal mobiletelecommunication system (UMTS), wireless broadband (WiBro), or globalsystem for mobile communication (GSM), as a cellular communicationprotocol. The wired connection can include, for example, at least one ofa universal serial bus (USB), high definition multimedia interface(HDMI), recommended standard 232 (RS-232), or plain old telephoneservice (POTS). The network 162 or 164 includes at least onecommunication network, such as a computer network (like a local areanetwork (LAN) or wide area network (WAN)), Internet, or a telephonenetwork.

The electronic device 101 further includes one or more sensors 180 thatcan meter a physical quantity or detect an activation state of theelectronic device 101 and convert metered or detected information intoan electrical signal. For example, the sensor(s) 180 includes one ormore cameras or other imaging sensors, which may be used to captureimages of scenes. The sensor(s) 180 can also include one or more buttonsfor touch input, one or more microphones, a gesture sensor, a gyroscopeor gyro sensor, an air pressure sensor, a magnetic sensor ormagnetometer, an acceleration sensor or accelerometer, a grip sensor, aproximity sensor, a color sensor (such as a red green blue (RGB)sensor), a bio-physical sensor, a temperature sensor, a humidity sensor,an illumination sensor, an ultraviolet (UV) sensor, an electromyography(EMG) sensor, an electroencephalogram (EEG) sensor, an electrocardiogram(ECG) sensor, an infrared (IR) sensor, an ultrasound sensor, an irissensor, or a fingerprint sensor. The sensor(s) 180 can further includean inertial measurement unit, which can include one or moreaccelerometers, gyroscopes, and other components. In addition, thesensor(s) 180 can include a control circuit for controlling at least oneof the sensors included here. Any of these sensor(s) 180 can be locatedwithin the electronic device 101.

The first external electronic device 102 or the second externalelectronic device 104 can be a wearable device or an electronicdevice-mountable wearable device (such as an HMD). When the electronicdevice 101 is mounted in the electronic device 102 (such as the HMD),the electronic device 101 can communicate with the electronic device 102through the communication interface 170. The electronic device 101 canbe directly connected with the electronic device 102 to communicate withthe electronic device 102 without involving with a separate network. Theelectronic device 101 can also be an augmented reality wearable device,such as eyeglasses, that include one or more cameras.

The first and second external electronic devices 102 and 104 and theserver 106 each can be a device of the same or a different type from theelectronic device 101. In some embodiments of this disclosure, theserver 106 includes a group of one or more servers. Also, in someembodiments of this disclosure, all or some of the operations executedon the electronic device 101 can be executed on another or multipleother electronic devices (such as the electronic devices 102 and 104 orserver 106). Further, in some embodiments of this disclosure, when theelectronic device 101 should perform some function or serviceautomatically or at a request, the electronic device 101, instead ofexecuting the function or service on its own or additionally, canrequest another device (such as electronic devices 102 and 104 or server106) to perform at least some functions associated therewith. The otherelectronic device (such as electronic devices 102 and 104 or server 106)is able to execute the requested functions or additional functions andtransfer a result of the execution to the electronic device 101. Theelectronic device 101 can provide a requested function or service byprocessing the received result as it is or additionally. To that end, acloud computing, distributed computing, or client-server computingtechnique may be used, for example. While FIG. 1 shows that theelectronic device 101 includes the communication interface 170 tocommunicate with the external electronic device 104 or server 106 viathe network 162 or 164, the electronic device 101 may be independentlyoperated without a separate communication function in some embodimentsof this disclosure.

The server 106 can include the same or similar components as theelectronic device 101 (or a suitable subset thereof). The server 106 cansupport to drive the electronic device 101 by performing at least one ofoperations (or functions) implemented on the electronic device 101. Forexample, the server 106 can include a processing module or processorthat may support the processor 120 implemented in the electronic device101. In some embodiments of this disclosure, the server 106 may obtainand process image frames and generate HDR images using guidedmulti-exposure image fusion as described in more detail below.

Although FIG. 1 illustrates one example of a network configuration 100including an electronic device 101, various changes may be made toFIG. 1. For example, the network configuration 100 could include anynumber of each component in any suitable arrangement. In general,computing and communication systems come in a wide variety ofconfigurations, and FIG. 1 does not limit the scope of this disclosureto any particular configuration. Also, while FIG. 1 illustrates oneoperational environment in which various features disclosed in thispatent document can be used, these features could be used in any othersuitable system.

FIG. 2 illustrates an example technique 200 for providing guidedmulti-exposure image fusion in accordance with this disclosure. For easeof explanation, the technique 200 of FIG. 2 may be described as beingused by the electronic device 101 of FIG. 1. However, the technique 200may be used with any suitable device(s) and in any suitable system(s),such as when the technique 200 is used with the server 106 in FIG. 1 orin another system.

As shown in FIG. 2, a set of input images of a scene is obtained atoperation 205. The input images represent multiple digital images of thescene, which may be captured using one or more cameras or other imagingsensors 180 of the electronic device 101. At least some of the inputimages are captured using different exposure values. In someembodiments, the different exposure values are obtained by varying theexposure times used to capture different images of the scene. In thisway, different ones of the input images capture different details of thescene. For instance, a larger-exposure image (such as an image takenwith a longer exposure time or slower shutter speed) can capture detailsin darker (low-key) portions of the scene that would appear invisible orgrainy at smaller exposure values. A smaller-exposure image (such as animage taken with a shorter exposure time or faster shutter speed) cancapture details in brighter (high-key) portions of the scene that wouldappear blown out at higher exposure values. The phrase “blown out” hereencompasses conditions where light provided by a portion of a sceneexceeds the upper limit of the dynamic range of an imaging sensor 180,resulting in significant or total loss of color saturation.

Each of the input images obtained during operation 205 includes imagedata in each of multiple channels of a color space. One example of acolor space and its constituent channels that may be used for the inputimages received at operation 205 is the “YCbCr” color space, where eachpixel of an image is expressed as a luminance (Y) channel value, ablue-difference chrominance (Cb) channel value, and a red-differencechrominance (Cr) channel value. Other examples of color spaces that maybe used for the input images received at operation 205 include the “RGB”(red-green-blue) color space, the “CMYK” (cyan-yellow-magenta-key) colorspace, and a Bayer color space (such as an BGGR, RGBG, GRGB, or RGGBcolor space).

For each channel of each input image, the image data of the channel isdecomposed into a base layer and a detail layer at operation 210. Insome embodiments, the image data of each channel can be represented asthe superposition or sum of a base layer and a detail layer. As used inthis disclosure, the phrase “base layer” refers to an image layer thatincludes large-scale variations in values of a channel of image data,and the phrase “detail layer” refers to an image layer that includessmall-scale (relative to the base layer) variations in values of achannel of image data.

As a particular example, the image data forming the luminance (Y)channel of an image i may be expressed as follows:

Y _(i) =YD _(i) +YB _(i)  (1)

As shown here, Y_(i) represents the sum of the detail layer YD_(i) andthe base layer YB_(i). Thus, the detail layer YD_(i) can be obtained bysubtracting the base layer YB_(i) from the original Y_(i) channel imagedata as follows:

YD _(i) =Y _(i) −YB _(i)  (2)

In some embodiments, the base layer for each channel can be obtained byapplying a box filter (such as boxfilt or imboxfilt in MATLAB) to theimage data of each channel. For example, the base layer YB_(i) of the Ychannel of image i might be obtained as follows:

YB _(i)=boxfilt(Y _(i),θ)  (3)

where θ is a parameter setting the size or kernel of the box filter. Thevalue of 9 can be tuned to optimize the quality of images produced bythe technique 200. From this, the detail layer YD_(i) can be obtained bysubtracting the base layer YB_(i) from Y_(i). Depending on theimplementation, the base and detail layers of each channel of each inputimage can be obtained using the same process described above withreference to the luminance channel Y_(i) of image i.

For each input image, an initial blending map is generated at operation215. In some embodiments, each initial blending map includes, for one ofthe input images, an initial determination of the weight to be given toeach pixel of the image when blending the images to form an HDR image.For example, consider an input image i associated with a low exposure(such as short exposure time). All other things being equal, the imagedetails in any low-key regions of input image i are likely to be poor ornonexistent due to the short exposure time, while the image details inany high-key regions of input image i are more likely to exhibit goodcolor saturation and not be blown out. Accordingly, an initial blendingmap for image i might assign higher weights to high-key regions of imagei than to low-key regions of image i. In this way, the contribution ofthe best-exposed portions of image i to the final HDR composite of theinput images would be greater than the contribution of thepoorly-exposed portions of image i.

In some embodiments, each initial blending map generated at operation215 includes, for each input image i, a composite of (i) a first map ofvalues of a contrast or saliency metric C and (ii) a second map ofvalues of a color saturation metric S. In this example, the values of Ccorrespond to the extent to which a given region of an input image iexhibits sufficient contrast from which edge details can be perceived.Also, in this example, the values of S correspond to the colorsaturation, such as whether the colors in a particular area appear deepor “blown out” and almost white. In particular embodiments, the firstmap C_(i) of the saliency metric C for an input image i can be obtainedas follows:

C _(i)=(Y _(i) *L)*G  (4)

where Y_(i) is the luminance channel of the image data for image i, L isa Laplacian operator, and G is a Gaussian filter. Also, in particularembodiments where the image data for the input image i is providedthrough the channels of the YCbCr color space, the second map S, of thecolor saturation metric S for the input image i can be obtained asfollows:

S _(i)=(Cb _(i)−128)²+(Cr _(i)−128)²  (5)

In some cases, an initial blending map P_(i) for the input image i isgenerated by combining and normalizing the first and second maps, whichmay occur as follows:

$\begin{matrix}{{\overset{˜}{P}}_{i} = {C_{i}*S_{i}}} & (6) \\{P_{i} = \frac{{\overset{˜}{P}}_{i}}{\sum\limits_{i = 1}^{N}{\overset{\sim}{P}}_{i}}} & (7)\end{matrix}$

These operations may be repeated for each input image so that an initialblending map P is generated for each input image. In this way, P_(i)assigns channel-agnostic initial blending weights that can be refined toproperly register with object boundaries within the scene.

In many cases, the initial blending maps P_(i) generated at operation215 are noisy, and the transitions in blending weights are spatiallyinconsistent relative to the boundaries of objects in the scene. Inpractical terms, if HDR images are formed by blending input images basedupon the initial blending maps, the weighting values for a given imageor layer may not register precisely with object boundaries, producingregions of improper exposures around the boundaries between high-key andlow-key areas of the image. Left uncorrected, these registration errorscan appear in the final HDR images as light halos (where the highweighting given to a high-exposure image to bring out detail in alow-key region spills over to a high-key region) or dark halos (wherethe high weighting given to a low-exposure image to preserve detail in ahigh-key region spills over to a low-key region).

In FIG. 2, registration errors in the initial blending maps that giverise to halos and other spatial inconsistencies within HDR images can besignificantly reduced or eliminated by applying one or more filters(such as one or more guided filters) to the initial blending maps. Thus,a first filter can be applied to each of the initial blending maps atoperation 220A to generate blending weight maps for the base layer ofeach input image, and/or a second filter can be applied to each of theinitial blending maps at operation 220B to generate blending weight mapsfor the detail layer of each input image. In some embodiments, for eachof the blending maps P_(i) generated at operation 215, the alignment ofblending weights relative to object boundaries can be enhanced byapplying one or more guided filters operating as one or moreedge-preserving filters, where each guided filter has a specified kernelsize governing the size of the image area processed by the guidedfilter. In some cases, the first filter may represent a guided filterwith a kernel of a first size (such as 25×25) that is applied to eachinitial blending map P_(i) to obtain, for each input image i, a blendingweight map WB_(i) for the base layer. In some embodiments, the dataY_(i) of the luminance channel of the input image i is used as theguiding image for the first filter. Also, in some cases, the secondfilter may represent a guided filter with a kernel of a smaller secondsize (such as 5×5) and lower blur degree relative to the first filterthat is applied to each initial blending map P_(i) to obtain, for eachinput image i, a blending weight map WD_(i) for the detail laver.

In particular embodiments, the filtering applied during operation 220Acan be represented as follows:

= G r 1 , ϵ 1 ⁡ ( P i , Y i ) ( 8 ) WB i = ∑ i = 1 N ⁢ ( 9 )

where G_(r,ε) denotes the guided filtering operation, and r and ε arethe parameters that decide the kernel size of the filter and blur degreeof the guided filter. As shown above, the blending weight map

for the base layer of the input image i is determined in Equation (8)and subsequently normalized in Equation (9) to account for the N numberof input images. Also, in particular embodiments, the filtering appliedduring operation 220B can be represented as follows:

= G r 2 , ϵ 2 ⁡ ( P i , Y i ) ( 10 ) WD i = ∑ i = 1 N ⁢ ( 11 )

By applying different filter parameters to obtain the blending weightmaps for the base and the detail layers, smoother-edged blending weightmaps for the base layer (where the blending weights for the base closelyfollow object boundaries) can be obtained. At the same time, theblending weight maps for the detail layer can preserve detail. In someembodiments, to help preserve color saturation details, blending weightsof the base layer in images with a short exposure time (such as thoseimages least likely to be blown out) can be enhanced.

In some embodiments, the process of reconstituting the decompositions ofthe channels of the input images is performed in two stages. In a firststage, fused base layers and fused detail layers of the constituentchannels of the color space are generated at operations 225A and 225B.In a second stage, the fused base layer and the fused detail layer ofeach channel are combined to obtain an HDR image at operation 230. Insome embodiments, the base layers of the channels for the input imagesare fused together according to the blending weight map for the baselayer generated at operation 225A to obtain fused base layers for thechannels. For example, when the input images are in the YCbCr colorspace, a fused base layer YB_(f) in the luminance channel, a fused baselayer CbB_(f) in the blue-difference chrominance channel, and a fusedbase layer CrB_(f) in the red-difference chrominance channel may beobtained during operation 225A. As another example, a fused detail layerYD_(f) in the luminance (Y) channel, a fused detail layer CbD_(f) in theblue-difference chrominance channel, and a fused detail layer CrB_(f) inthe red-difference chrominance channel may be obtained during operation225B.

In particular embodiments, the fused base layers for the channels of thecolor space of the input images can be obtained as follows:

YB _(f)=Σ_(i=1) ^(N) YB _(i) *WB _(i)  (12)

CbB _(f)=Σ_(i=1) ^(N) CbB _(i) *ds(WB _(i))  (13)

CrB _(f)=Σ_(i=1) ^(N) CrB _(i) *ds(WB _(i))  (14)

As shown above, for the luminance (Y) channel, the fused base layer isdetermined as a weighted average of each convolution of the luminancechannel base layer for each image i and the blending weight map WB_(i)for the base layer of image i. A similar weighted average can bedetermined for each of the blue-difference and red-differencechrominance channels, differing only in that a downsampling operator dscan be applied to each blending weight map WB_(i) to account for thefact that, in some embodiments, the Cb and Cr channels contain half asmuch data as the luminance channel. Also, in particular embodiments, thefused detail layers for the channels of the input images can be obtainedas follows:

YD _(f)=Σ_(i=1) ^(N) YD _(i) *WD _(i)  (15)

CbD _(f)=Σ_(i=1) ^(N) CbD _(i) *ds(WD _(i))  (16)

CrD _(f)=Σ_(i=1) ^(N) CrD _(i) *ds(WD _(i))  (17)

Once again, ds is a downsampling operator to compensate for the factthat the chrominance channels may be half the size of the luminancechannel.

A final HDR image is generated at operation 230. In some embodiments,the final HDR image is generated by combining, for each of the channelsof the color space of the input images, the fused base layers and thefused detail layers generated at operations 225A and 225B. For example,in embodiments where the input images are in the YCbCr color space, theY channel of the final HDR image can be obtained by combining the fusedbase layer YB_(f) with the fused detail layer YD_(f) as follows:

Y _(f) =YB _(f) +YD _(f)  (18)

Also, in this example, the chrominance channels of the final HDR imagecan similarly be obtained by combining the fused base layers and thefused detail layers as follows:

Cb _(f) =CbB _(f) +CbD _(f)+128  (19)

Cr _(f) =CrB _(f) +CrD _(f)+128  (20)

As shown here, in some embodiments, an adjustment constant (128 in thisexample) may be added to the combined values of the fused base layer andthe fused detail layer to account for the differences in data depthbetween channels of the color space, although other adjustment constantsor no adjustment constants may be used.

Note that the operations and functions described above with reference toFIG. 2 can be implemented in an electronic device 101, 102, 104, server106, or other device in any suitable manner. For example, in someembodiments, the operations and functions described above can beimplemented or supported using one or more software applications orother software instructions that are executed by at least one processor120 of a device. In other embodiments, at least some of the operationsand functions described above can be implemented or supported usingdedicated hardware components. In general, the operations and functionsdescribed above can be performed using any suitable hardware or anysuitable combination of hardware and software/firmware instructions.

Although FIG. 2 illustrates one example of a technique 200 for providingguided multi-exposure image fusion, various changes may be made to FIG.2. For example, the technique 200 shown in FIG. 2 may be used to fusemultiple images with different exposure values to generate HDR images orother types of images. Also, any suitable types of images may be used asthe input images here, such as multi-spectral images, multi-flashimages, and multi-camera images.

FIGS. 3A, 3B, 3C, 3D, 3E, and 3F illustrate example operations fordecomposing input image data into base and detail layers in accordancewith this disclosure. More specifically, these figures illustrate howinput images that are obtained during operation 205 in FIG. 2 may bedecomposed during operation 210 in FIG. 2.

FIG. 3A illustrates example image data in the Y channel of an image of ascene taken over a shorter exposure, and FIG. 3D illustrates exampleimage data in the Y channel of another image of the same scene takenover a longer exposure. In this example, details in high-key areas ofthe scene, such as the faces of the inflatable snowmen, are clearlyvisible in the shorter-exposure image of FIG. 3A but generally blown outin the longer-exposure image of FIG. 3D. By the same token, details inlow-key areas of the scene, such as the tree and writing on the wall inthe background, are generally invisible in the shorter-exposure image ofFIG. 3A but clearly captured in the longer-exposure image of FIG. 3D.

FIG. 3B illustrates an example base layer obtained by decomposing the Ychannel data of the shorter-exposure image data shown in FIG. 3A. Insome embodiments, the base layer shown in FIG. 3B is obtained byapplying a box filter to the Y channel image data of FIG. 3A. As shownin FIG. 3B, the base layer captures the large-scale variations in the Yvalues across the input image but not the smaller-scale variations inthe Y values. In this example, this means that the exterior boundariesof the snowmen are included in the base layer, but the seams and facialdetails of the snowmen are not in the base layer. FIG. 3E illustrates anexample base layer obtained by decomposing the Y channel data of thelonger-exposure image data shown in FIG. 3D. As shown in FIG. 3E,large-scale variations in the Y values, such as the forms of thesnowmen, the tree, and blocks of black corresponding to writing on thewall in the background, are once again captured in the base layer, butsmall-scale variations do not appear in the base layer.

FIG. 3C illustrates an example detail layer of a decomposition of the Ychannel image data shown in FIG. 3A. In some embodiments, the detaillayer shown in FIG. 3C is obtained by subtracting the base layer imagedata of FIG. 3B from the Y channel image data of FIG. 3A. As shown inFIG. 3E, small-scale details, such as the buttons and seams of theinflatable snowmen, are captured in the detail layer. FIG. 3Fillustrates an example detail layer of a decomposition of the Y channelimage data shown in FIG. 3D. In some embodiments, the detail layer shownin FIG. 3F is obtained by subtracting the base layer image data of FIG.3E from the from the Y channel image data of FIG. 3D.

Although FIGS. 3A, 3B, 3C, 3D, 3E, and 3F illustrate examples ofoperations for decomposing input image data into base and detail layers,various changes may be made to these figures. For example, the contentsof the images shown here are for illustration only and can vary widelybased on the images being captured and processed. Also, similaroperations can occur in each channel of each input image.

FIGS. 4A, 4B, 4C, 4D, 4E, 4F, 4G, and 4H illustrate example initialblending maps and blending weight maps for base and detail layers inaccordance with this disclosure. More specifically, these figuresillustrate how initial blending maps and blending weight maps may begenerated during operations 215, 220A, and 220B in FIG. 2.

FIG. 4A illustrates example image data of a shorter-exposure image of ascene. As with FIG. 3A, the facial and seam details of the illuminatedinflatable snowman are captured in the shorter-exposure image, while thetree and background are underexposed to the point of invisibility. FIG.4E illustrates example image data of a longer-exposure image of a scene.As with FIG. 3D, while the high-key regions of the image such as theilluminated snowmen are blown out and generally white and featureless,details in the low-key areas of the image (such as the tree andbackground) have been captured in the image.

FIG. 4B provides an example of an initial blending map, such as aninitial blending map generated at operation 215 of FIG. 2. In thisexample, regions of the input image shown in FIG. 4A to which highestinitial weighting values have been assigned are shown in white, andregions of the input image to which the lowest weighting values havebeen assigned are shown in black. Regions of the input image to whichintermediate initial weighting values have been assigned are shown incorresponding shades of grey. Similarly, FIG. 4F provides an example ofan initial blending map, such as another initial blending map generatedat operation 215, for the longer-exposure image shown in FIG. 4E.

FIG. 4C provides an example of a blending weight map for the base layerof the shorter-exposure input image, such as one generated by applying afirst (larger kernel) guided filter or other filter in operation 220A ofFIG. 2 to the initial blending weight map shown in FIG. 4B. In someembodiments, data from the Y channel of the input image shown in FIG. 4Ais used as a guide image for the first filter. As shown in FIG. 4C,application of the first filter sharpens the boundaries of objects inthe blending map relative to the edges shown in FIG. 4B, therebyreducing the incidence of spatial inconsistencies and overshoots thatcan give rise to halo effects or other visual artifacts. FIG. 4Gprovides an example of a blending weight map for the base layer of thelonger-exposure input image, such as one generated by applying the first(large kernel) guided filter or other filter in operation 220A of FIG. 2to the initial blending weight map shown in FIG. 4F. As with FIG. 4C,application of the first filter refines and sharpens edges within thebase layer in FIG. 4G relative to the initial blending map shown in FIG.4F. Again, refinement of the edges within the blending weight map forthe base layer to the objects in the scene reduces the incidence ofspatial inconsistencies and overshoots that can give rise to haloeffects or other visual artifacts.

FIG. 4D illustrates an example of a blending weight map for the detaillayer of the shorter-exposure input image, such as one generated byapplying a second guided filter or other filter in operation 220B ofFIG. 2 to the initial blending weight map shown in FIG. 4B. In someembodiments, the second filter uses a smaller kernel and differentblending values than the first filter. Also, in some embodiments, thesecond filter uses image data in the Y channel of the input image as aguide image. As shown in FIG. 4D, the second filter “buffs out”inconsistencies within the weighting of the shorter-exposure image inregions where the shorter-exposure image has a high weighting value. Inthis way, the details that are well-captured by the shorter-exposureimage (such as details within high-key regions of the image, like thesnowmen's bodies) are consistently weighted within the final HDR image.This also helps to reduce the incidence of spatial inconsistencies andovershoots that can give rise to halo effects or other visual artifactscaused by inconsistencies or other issues in the underlying blendingmaps.

FIG. 4H illustrates an example of a blending weight map for the detaillayer for the longer-exposure input image, such as one generated byapplying a second guided filter or other filter in operation 220B ofFIG. 2 to the initial blending weight map shown in FIG. 4F. In someembodiments, the second filter uses a smaller kernel and differentblending values than the first filter. Also, in some embodiments, thesecond filter uses image data in the Y channel of the input image as aguide image. As shown in FIG. 4H, application of the second filterrefines the initial blending map by smoothing out local inconsistenciesin the initial blending map. For example, the initial blending map shownin FIG. 4F includes some isolated regions with high weighting values(which appear in white or light grey in FIG. 4F) assigned to blown-outhigh-key regions (such as the snowmen's bodies). Through application ofthe second filter, these local inconsistencies are smoothed out in theblending weight map for the detail layer shown in FIG. 4H.

Although FIGS. 4A, 4B, 4C, 4D, 4E, 4F, 4G, and 4H illustrate examples ofinitial blending maps and blending weight maps for base and detaillayers, various changes may be made to these figures. For example, thecontents of the images shown here are for illustration only and can varywidely based on the images being captured and processed. Also, similaroperations can occur in each channel of each input image.

FIG. 5 illustrates an example combination of a fused base layer and afused detail layer to obtain a channel of an HDR image in accordancewith this disclosure. More specifically, this figure illustrates howfused base and detail layers (such as those obtained at steps 225A and225B in FIG. 2) for a given channel may be combined during operation 230in FIG. 2.

As shown in FIG. 5, an image 505 of fused Y channel base layer data formultiple input images is shown. In some embodiments, the fused image 505is generated by combining the Y channel base layers for the inputimages, where the Y channel base layer of each image contributes to thefused base layer for the Y channel according to weights specified by theblending weight map for the base layer of the image. Also, as shown inFIG. 5, an image 510 of fused Y channel detail layer data for multipleinput images is shown. In some embodiments, the fused image 510 isgenerated by combining the Y channel detail layers for the input images,where each Y channel detail layer of each image contributes to the fuseddetail layer according to weights specified by the blending weight mapfor the detail layer of the image.

An image 515 in FIG. 5 represents a combination of the fused base layerdata shown in image 505 and the fused detail layer data shown in image510. As can be seen in FIG. 5, both high-key and low-key regions of theimage 515 include clear detail. This can be seen, for example, by theway that the horizontal members of the back of the bench ringing thetree are bright enough to be seen while, at the same time, theinflatable snowmen are not blown out and their details are visible.Further, there are no dark or light halos along the boundaries betweenhigh-key and low-key areas of the image.

Although FIG. 5 illustrates one example of a combination of a fused baselayer and a fused detail layer to obtain a channel of an HDR image,various changes may be made to FIG. 5. For example, the contents of theimages shown here are for illustration only and can vary widely based onthe images being captured and processed. Also, similar operations canoccur in each channel of each input image.

FIG. 6 illustrates an example method 600 for performing guidedmulti-exposure image fusion in accordance with this disclosure. For easeof explanation, the method 600 of FIG. 6 may be described as beingperformed by the electronic device 101 of FIG. 1. However, the method600 may be performed with any suitable device(s) and in any suitablesystem(s), such as when the method 600 is performed by the server 106 inFIG. 1 or in another system.

As shown in FIG. 6, a processor of an electronic device (such as theprocessor 120 of the electronic device 101) obtains multiple input imageof a scene at step 605. The input images of the scene include a firstimage associated with a first exposure value and a second imageassociated with a second exposure value. Each image includes image datain multiple channels of a color space (such as the RGB or YCbCr colorspace), and the first exposure value is greater than the second exposurevalue. The processor decomposes each channel of each input image into abase layer and a detail layer at step 610. In some embodiments, thedecomposition of each channel of each input image is performed byapplying a box filter or other function to the image data in eachchannel.

The processor generates, for each image, a blending weight map for thebase layer of the image and a blending weight map for the detail layerof the image at step 615. In some embodiments, the blending weight mapfor the base layer of the image is generated using a first filter with afirst kernel size, and the blending weight map for the detail layer ofthe image is generated by using a second filter with a second kernelsize, where the second kernel size is smaller than the first. Also, insome embodiments, the guiding image for the first and second filters isthe image data in the Y channel for each input image. Additionally, insome embodiments, the blending weights for blending weight maps in thebase layers are enhanced relative to those of the blending weight mapsfor the detail layers in order to preserve color saturation details.

The processor combines each base layer and each detail layer of eachchannel of each image according to the blending weight map for the baselayer of the image and the blending weight map for the detail layer ofthe image to obtain an HDR image of the scene at step 620. In someembodiments, the base and detail layers are combined for each channel ofthe color space of the HDR image to produce a fused base layer and afused detail layer for each channel, and the fused base layer and thefused detail layer for each channel are subsequently combined to producefinal image data for one channel of the HDR image. This can be done foreach channel of the image data to produce the final HDR image.

Although FIG. 6 illustrates one example of a method 600 for performingguided multi-exposure image fusion, various changes may be made to FIG.6. For example, while shown as a series of steps, various steps in FIG.6 may overlap, occur in parallel, occur in a different order, or occurany number of times.

FIGS. 7A and 7B illustrate example methods 700 and 750 for supportingguided multi-exposure image fusion in accordance with this disclosure.More specifically, FIG. 7A illustrates an example method 700 forgenerating blending weight maps, and FIG. 7B illustrates an examplemethod 750 for generating an HDR image. For ease of explanation, themethods 700 and 750 of FIGS. 7A and 7B may be described as beingperformed by the electronic device 101 of FIG. 1. However, the methods700 and 750 may be performed with any suitable device(s) and in anysuitable system(s), such as when the methods 700 and 750 are performedby the server 106 in FIG. 1 or in another system.

As shown in FIG. 7A, the processor generates an initial blending map foreach obtained input image at step 705. In some embodiments, each initialblending map is generated as a composite of a saliency map for the imageand a color saturation map for the image. For each initial blending mapof each image, a first filter (such as a first guided filter) is appliedto generate a blending weight map for the base layer of that image atstep 710. In some embodiments, the first filter is associated with afirst (comparatively large) kernel size and a (comparatively) highdegree of blur. For each initial blending map of each image, a secondfilter (such as a second guided filter) is applied to generate ablending weight map for the detail layer of that image at step 715. Insome embodiments, the second filter is associated with a second(comparatively small) kernel size and a (comparatively) low degree ofblur.

As shown in FIG. 7B, the processor generates a fused base layer for eachchannel of the color space of the input images at step 755. In someembodiments, the fused base layer for each channel can be obtained as aweighted average of the convolution of the base layer of each image andthe blending weight map for the base layer for each image. The processorgenerates a fused detail layer for each channel of the color space ofthe input images at step 760. In some embodiments, the fused detaillayer for each channel can be obtained as a weighted average of theconvolution of the detail layer of each image and the blending weightmap for the detail layer for each image. The fused base layer and thefused detail layer for each channel are combined to form an HDR image atstep 765.

Although FIGS. 7A and 7B illustrate examples of methods 700 and 750 forsupporting guided multi-exposure image fusion, various changes may bemade to FIGS. 7A and 7B. For example, while shown as a series of stepsin each figure, various steps in each figure may overlap, occur inparallel, occur in a different order, or occur any number of times.

Although this disclosure has been described with example embodiments,various changes and modifications may be suggested to one skilled in theart. It is intended that this disclosure encompass such changes andmodifications as fall within the scope of the appended claims.

What is claimed is:
 1. A method comprising: obtaining, using at leastone processor, multiple images of a scene including a first imageassociated with a first exposure value and a second image associatedwith a second exposure value, each image comprising image data in eachof multiple channels of a color space, the first exposure value greaterthan the second exposure value; decomposing, using the at least oneprocessor, each channel of each image into a base layer and a detaillayer; generating, using the at least one processor and for each image,a blending weight map for the base layer and a blending weight map forthe detail layer; and combining, using the at least one processor, thebase layers and the detail layers based on the blending weight maps toobtain a high dynamic range (HDR) image of the scene.
 2. The method ofclaim 1, wherein generating, for each image, the blending weight map forthe base layer and the blending weight map for the detail layercomprises: generating an initial blending map of each image; for eachinitial blending map of each image, applying a first filter to generatethe blending weight map for the base layer; and for each initialblending map of each image, applying a second filter to generate theblending weight map for the detail layer.
 3. The method of claim 2,wherein at least one of the first and second filters comprises a guidedfilter.
 4. The method of claim 2, wherein: the first filter comprises afirst guided filter with a first kernel size; the second filtercomprises a second guided filter with a second kernel size; and thefirst kernel size is greater than the second kernel size.
 5. The methodof claim 2, wherein the first filter is guided by image data in aluminance (Y) channel.
 6. The method of claim 1, wherein combining thebase layers and the detail layers comprises: generating a fused baselayer for each channel of the color space based on the blending weightmaps for the base layers of the images; generating a fused detail layerfor each channel of the color space based on the blending weight mapsfor the detail layers of the images; and combining the fused base layersand the fused detail layers for each channel of the color space toobtain the HDR image.
 7. The method of claim 1, further comprising:preserving saturation details by enhancing blending weights of the baselayer of the second image.
 8. An electronic device comprising: at leastone processor; and at least one memory containing instructions that,when executed by the at least one processor, cause the electronic deviceto: obtain multiple images of a scene including a first image associatedwith a first exposure value and a second image associated with a secondexposure value, each image comprising image data in each of multiplechannels of a color space, the first exposure value greater than thesecond exposure value; decompose each channel of each image into a baselayer and a detail layer; generate, for each image, a blending weightmap for the base layer and a blending weight map for the detail layer;and combine the base layers and the detail layers based on the blendingweight maps to obtain a high dynamic range (HDR) image of the scene. 9.The electronic device of claim 8, wherein the instructions that whenexecuted cause the electronic device to generate, for each image, theblending weight map for the base layer and the blending weight map ofthe detail layer comprise: instructions that, when executed by the atleast one processor, cause the electronic device to: generate an initialblending map of each image; for each initial blending map of each image,apply a first filter to generate the blending weight map for the baselayer; and for each initial blending map of each image, apply a secondfilter to generate the blending weight map for the detail layer.
 10. Theelectronic device of claim 9, wherein at least one of the first andsecond filters comprises a guided filter.
 11. The electronic device ofclaim 9, wherein: the first filter comprises a first guided filter witha first kernel size; the second filter comprises a second guided filterwith a second kernel size; and the first kernel size is greater than thesecond kernel size.
 12. The electronic device of claim 9, wherein thefirst filter is guided by image data in a luminance (Y) channel.
 13. Theelectronic device of claim 8, wherein the instructions that whenexecuted cause the electronic device to combine the base layers and thedetail layers comprise: instructions that, when executed by the at leastone processor, cause the electronic device to: generate a fused baselayer for each channel of the color space based on the blending weightmaps for the base layers of the images; generate a fused detail layerfor each channel of the color space based on the blending weight mapsfor the detail layers of the images; and combine the fused base layersand the fused detail layers for each channel of the color space toobtain the HDR image.
 14. The electronic device of claim 8, wherein theat least one memory further contains instructions that, when executed bythe at least one processor, cause the electronic device to preservesaturation details by enhancing blending weights of the base layer ofthe second image.
 15. A non-transitory computer-readable mediumcontaining instructions that, when executed by at least one processor,cause an electronic device to: obtain multiple images of a sceneincluding a first image associated with a first exposure value and asecond image associated with a second exposure value, each imagecomprising image data in each of multiple channels of a color space, thefirst exposure value greater than the second exposure value; decomposeeach channel of each image into a base layer and a detail layer;generate, for each image, a blending weight map for the base layer and ablending weight map for the detail layer; and combine the base layersand the detail layers based on the blending weight maps to obtain a highdynamic range (HDR) image of the scene.
 16. The non-transitorycomputer-readable medium of claim 15, wherein the instructions that whenexecuted cause the electronic device to generate, for each image, theblending weight map for the base layer and the blending weight map forthe detail layer comprise: instructions that, when executed by the atleast one processor, cause the electronic device to: generate an initialblending map of each image; for each initial blending map of each image,apply a first filter to generate the blending weight map for the baselayer; and for each initial blending map of each image, apply a secondfilter to generate the blending weight map for the detail layer.
 17. Thenon-transitory computer-readable medium of claim 16, wherein at leastone of the first and second filters comprises a guided filter.
 18. Thenon-transitory computer medium of claim 16, wherein: the first filtercomprises a first guided filter with a first kernel size; the secondfilter comprises a second guided filter with a second kernel size; andthe first kernel size is greater than the second kernel size.
 19. Thenon-transitory computer-readable medium of claim 15, wherein theinstructions that when executed cause the electronic device to combinethe base layers and the detail layers comprise: instructions that, whenexecuted by the at least one processor, cause the electronic device to:generate a fused base layer for each channel of the color space based onthe blending weight maps for the base layers of the images; generate afused detail layer for each channel of the color space based on theblending weight maps for the detail layers of the images; and combinethe fused base layers and the fused detail layers for each channel ofthe color space to obtain the HDR image.
 20. The non-transitorycomputer-readable medium of claim 15, further containing instructionsthat, when executed by the at least one processor, cause the electronicdevice to preserve saturation details by enhancing blending weights ofthe base layer of the second image.